Optimal. Leaf size=307 \[ \frac {2 a (A b-a B) \sin (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^{3/2}}+\frac {2 \left (2 a^2 B+a A b-3 b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (2 a^3 B+a^2 A b-6 a b^2 B+3 A b^3\right ) \sin (c+d x)}{3 b d \left (a^2-b^2\right )^2 \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (2 a^3 B+a^2 A b-6 a b^2 B+3 A b^3\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^2 d \left (a^2-b^2\right )^2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.47, antiderivative size = 307, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.258, Rules used = {2968, 3021, 2754, 2752, 2663, 2661, 2655, 2653} \[ \frac {2 \left (a^2 A b+2 a^3 B-6 a b^2 B+3 A b^3\right ) \sin (c+d x)}{3 b d \left (a^2-b^2\right )^2 \sqrt {a+b \cos (c+d x)}}+\frac {2 a (A b-a B) \sin (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^{3/2}}+\frac {2 \left (2 a^2 B+a A b-3 b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (a^2 A b+2 a^3 B-6 a b^2 B+3 A b^3\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^2 d \left (a^2-b^2\right )^2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 2754
Rule 2968
Rule 3021
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{5/2}} \, dx &=\int \frac {A \cos (c+d x)+B \cos ^2(c+d x)}{(a+b \cos (c+d x))^{5/2}} \, dx\\ &=\frac {2 a (A b-a B) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}-\frac {2 \int \frac {\frac {3}{2} b (A b-a B)-\frac {1}{2} \left (a A b+2 a^2 B-3 b^2 B\right ) \cos (c+d x)}{(a+b \cos (c+d x))^{3/2}} \, dx}{3 b \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}+\frac {2 \left (a^2 A b+3 A b^3+2 a^3 B-6 a b^2 B\right ) \sin (c+d x)}{3 b \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}+\frac {4 \int \frac {-\frac {1}{4} b \left (4 a A b-a^2 B-3 b^2 B\right )-\frac {1}{4} \left (a^2 A b+3 A b^3+2 a^3 B-6 a b^2 B\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b \left (a^2-b^2\right )^2}\\ &=\frac {2 a (A b-a B) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}+\frac {2 \left (a^2 A b+3 A b^3+2 a^3 B-6 a b^2 B\right ) \sin (c+d x)}{3 b \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}+\frac {\left (a A b+2 a^2 B-3 b^2 B\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b^2 \left (a^2-b^2\right )}-\frac {\left (a^2 A b+3 A b^3+2 a^3 B-6 a b^2 B\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{3 b^2 \left (a^2-b^2\right )^2}\\ &=\frac {2 a (A b-a B) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}+\frac {2 \left (a^2 A b+3 A b^3+2 a^3 B-6 a b^2 B\right ) \sin (c+d x)}{3 b \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}-\frac {\left (\left (a^2 A b+3 A b^3+2 a^3 B-6 a b^2 B\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{3 b^2 \left (a^2-b^2\right )^2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (\left (a A b+2 a^2 B-3 b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{3 b^2 \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\\ &=-\frac {2 \left (a^2 A b+3 A b^3+2 a^3 B-6 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^2 \left (a^2-b^2\right )^2 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (a A b+2 a^2 B-3 b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 a (A b-a B) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}+\frac {2 \left (a^2 A b+3 A b^3+2 a^3 B-6 a b^2 B\right ) \sin (c+d x)}{3 b \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.03, size = 224, normalized size = 0.73 \[ \frac {2 \left (\frac {b \sin (c+d x) \left (b \left (2 a^3 B+a^2 A b-6 a b^2 B+3 A b^3\right ) \cos (c+d x)+a \left (a^3 B+2 a^2 A b-5 a b^2 B+2 A b^3\right )\right )}{\left (a^2-b^2\right )^2}-\frac {\left (\frac {a+b \cos (c+d x)}{a+b}\right )^{3/2} \left (\left (2 a^3 B+a^2 A b-6 a b^2 B+3 A b^3\right ) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-(a-b) \left (2 a^2 B+a A b-3 b^2 B\right ) F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )}{(a-b)^2}\right )}{3 b^2 d (a+b \cos (c+d x))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.78, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (B \cos \left (d x + c\right )^{2} + A \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a}}{b^{3} \cos \left (d x + c\right )^{3} + 3 \, a b^{2} \cos \left (d x + c\right )^{2} + 3 \, a^{2} b \cos \left (d x + c\right ) + a^{3}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 5.28, size = 860, normalized size = 2.80 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\cos \left (c+d\,x\right )\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{5/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________